package demo.dubbo.web;

import java.math.BigDecimal;

/**
 * Created by lushun.chen on 2017/3/20.
 *
 * @author lushun.chen
 */
public class User implements Comparable<User> {

    private Long id;
    private int age;

    public User(Long id, int age) {
        this.id = id;
        this.age = age;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public int compareTo(User o) {
        if (age >= o.age) {
            return -1;
        }
        return 1;

    }
}
